<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register backend routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "backend" middleware group. Enjoy building your backend!
|
*/
Route::apiResource('uploads','UploadController');
Route::apiResource('codes','CodeController');
Route::apiResource('tokens','TokenController');
Route::group(['middleware' => ['auth:mp']],function () {
    Route::apiResources([
        'wx-bind' => 'WxBindController',
        'users' => 'UserController',
        'book-rules'=>'BookRuleController',
        'book-orders'=> 'BookOrderController',
        'bills'=>'BillController',
        'book-order-count'=> 'BookOrderCountController',
        'qr-codes'=> 'QrCodeController',
        'addition-rules'=> 'AdditionRuleController',
        'addition-orders'=> 'AdditionOrderController',
        'official-orders'=> 'OfficialOrderController',
        'children' => 'ChildController',
        'school-rules' => 'SchoolRuleController'
    ]);
});

